<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>云市场</title>
    <link rel="shortcut icon" href="__PUBLIC__/admin/favicon.ico">
    <link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/animate.css" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/admin/ysc/css/base_PC.css">
    <link rel="stylesheet" href="__PUBLIC__/admin/ysc/styl/bazaar.css">
    <style>
        .btn1 {
            width: 200px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            border-radius: 5px;
            display: block;
            margin: 40px auto 20px;
            color: #fff;
            background: #27c24c;
        }
        .btn2 {
            width: 200px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            border-radius: 5px;
            display: block;
            margin: 40px auto 20px;
            color: #fff;
            background: #f05050;
        }
        .btn3 {
            width: 200px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            border-radius: 5px;
            display: block;
            margin: 40px auto 20px;
            color: #fff;
            background: #3f51b5;
        }
    </style>
</head>
<include file="Admin@Index:cache" />
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">

    <div class="row">
        <button type="button" class="btn btn-white" style="    margin-left: 11%;width: 100px;height: 40px;font-size: 18px;" onclick="self.location=document.referrer;" ><strong>返回</strong></button>
        <div class="main_box">
            <div class="info_box">
                <div class="info_title">
                    <if condition="$data['logo'] neq ''"><img src="<{$data.logo}>" height="80" width="175"/></if>
                    <span><{$data.name}></span>
                </div>
                <div class="content_box">
                    <div class="C_info">
                        <div class="C_left">
                            <div>
                                <span>结算方式：</span>
                                <span>
                                   <{$data.cooperation}>
                                </span>
                            </div>
                            <div>
                                <span>结算周期：</span>
                                <span>
                                 <switch name="data.settlement">
                                        <case value="1">预存</case>
                                        <case value="2">周结</case>
                                        <case value="3">月结</case>
                                    </switch>
                                </span>
                            </div>
                            <div>
                                <span>上线周期：</span><span><{$data.cycle}></span>
                            </div>
                            <div>
                                <span>预计效果：</span><span><{$data.effect}></span>
                            </div>
                            <div>
                                <span>价格示范：</span><span><{$data.demonstration}></span>
                            </div>
                        </div>
                        <div class="C_right">
                            <p><{$data.company}></p>
                            <p>商务联系电话</p>
                            <p><i class="fa fa-phone"> </i> <{$data.phone}></p>
                        </div>
                    </div>

                    <switch name="status">
                        <case value="1"><span class="btn2" >服务商正在审核中</span></case>
                        <case value="2"><span class="btn1 btn-success" >已成功接入</span></case>
                        <default /><span class="btn3" onclick="add()">申请接入服务商</span>
                    </switch>
                    <p>申请接入服务商后需要服务商审核并通过，请先与服务商联系洽谈好后再申请接入</p>
                </div>
                <div class="remark">注意：平台不参与交易过程，如产生交易纠纷请自行协商解决，平台不承担法律后果及交易调节。</div>
            </div>
        </div>

    </div>


</div>
<script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/admin/js/layer/layer.js"></script>
<script src="__PUBLIC__/admin/js/layui/layui.js"></script>
<script src="__PUBLIC__/admin/js/content.js?v=1.0.0"></script>
<script src="__PUBLIC__/admin/js/plugins/fancybox/jquery.fancybox.js"></script>
</body>
<script>
    function add(){
        var index = layer.load(1, {
            shade: [0.1,'#fff'] //0.1透明度的白色背景
        });
        layer.confirm('确定要申请该服务商吗？', {
            btn: ['确定','取消'] //按钮
        },function(){
            $.post('__MODULE__/Market/apply',{id:'<{$data.id}>',name:'<{$data.name}>'},function(data){
                layer.closeAll();
                if(data.code=='1001'){
                    layer.msg(data.result,{time:2000,icon:6});
                    window.location.href=window.location.href;
                }else{
                    if(data.status=='0'){
                        layer.msg(data.info,{time:2000,icon:5});
                    }else{
                        layer.msg(data.result,{time:2000,icon:5});
                    }
                }
            });
        }, function(){
            layer.close(index);
        });
    }
</script>
</html>
